using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using FeedBurner.Operations;

namespace FeedBurner
{
    public class Feeds
    {
        #region Find
        public static List<Feed> Find(User user)
        {
            return Find(user.Username, user.Password);
        }
        public static List<Feed> Find(string username, string password)
        {
            FindFeeds objFindFeeds = new FindFeeds();
            return objFindFeeds.Find(username, password);
        }
        #endregion

        #region Get
        public static Feed Get(User user, Feed feed)
        {
            return Get(user.Username, user.Password, feed.ID, feed.Uri);
        }
        public static Feed Get(User user, Int64 feedID)
        {
            return Get(user.Username, user.Password, feedID, null);
        }
        public static Feed Get(User user, string uri)
        {
            return Get(user.Username, user.Password, 0, uri);
        }
        public static Feed Get(string username, string password, Int64 feedID, string uri)
        {
            GetFeed objGetFeed = new GetFeed();
            return objGetFeed.Get(username, password, feedID, uri);
        }
        #endregion

        #region Add
        public static Feed Add(User user, Feed feed)
        {
            return Add(user.Username, user.Password, feed);
        }
        public static Feed Add(string username, string password, Feed feed)
        {
            AddFeed objAddFeed = new AddFeed();
            return objAddFeed.Add(username, password, feed);
        }
        #endregion

        #region Modify
        public static Feed Modify(User user, Feed feed)
        {
            return Modify(user.Username, user.Password, feed);
        }
        public static Feed Modify(string username, string password, Feed feed)
        {
            ModifyFeed objModifyFeed = new ModifyFeed();
            return objModifyFeed.Modify(username, password, feed);
        }
        #endregion

        #region Delete
        public static void Delete(User user, Feed feed)
        {
            Delete(user.Username, user.Password, feed);
        }
        public static void Delete(string username, string password, Feed feed)
        {
            Delete(username, password, feed.ID, feed.Uri);
        }
        public static void Delete(User user, Int64 feedID, string uri)
        {
            Delete(user.Username, user.Password, feedID, uri);
        }
        public static void Delete(string username, string password, Int64 FeedID, string uri) 
        {
            DeleteFeed objDeleteFeed = new DeleteFeed();
            objDeleteFeed.Delete(username, password, FeedID, uri);
        }
        #endregion

        #region Resync
        public static void Resync(User user, Feed feed)
        {
            Resync(user.Username, user.Password, feed);
        }
        public static void Resync(string username, string password, Feed feed) 
        {
            Resync(username, password, feed.ID, feed.Uri);
        }
        public static void Resync(User user, Int64 feedID, string uri)
        {
            Resync(user.Username, user.Password, feedID, uri);
        }
        public static void Resync(string username, string password, Int64 FeedID, string uri)
        {
            ResyncFeed objResyncFeed = new ResyncFeed();
            objResyncFeed.Resync(username, password, FeedID, uri);
        }
        #endregion
    }
}
